<template>
  <!-- eslint-disable vue/html-indent -->
  <!-- eslint-disable vue/html-self-closing -->
  <!-- eslint-disable vue/html-closing-bracket-newline -->
  <div ref="charts" class="charts"></div>
</template>

<script>
/* eslint-disable spaced-comment */
/* eslint-disable eqeqeq */
/* eslint-disable comma-dangle */
/* eslint-disable quotes */
/* eslint-disable semi */
import * as echarts from "echarts";
export default {
  name: "BarCharts",
  mounted() {
    const lineCharts = echarts.init(this.$refs.charts);
    lineCharts.setOption({
      xAxis: {
        show: false,
        type: "category",
      },
      yAxis: {
        show: false,
      },
      series: [
        {
          type: "bar",
          data: [
            {
              name: "衣服",
              value: "10",
            },
            {
              name: "裤子",
              value: "7",
            },
            {
              name: "帽子",
              value: "33",
            },
            {
              name: "鞋子",
              value: "12",
            },
            {
              name: "袜子",
              value: "28",
            },
            {
              name: "毛衣",
              value: "9",
            },
          ],
          color: "purple",
        },
      ],
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
      tooltip: {},
    });
  },
};
</script>

<style scoped>
.charts {
  width: 100%;
  height: 100%;
}
</style>
